﻿#include "CFDPostMenu.h"

#include <Tools/Win64/SARibbon/include/SARibbon-2.0.1/SARibbonApplicationButton.h>
#include <Tools/Win64/SARibbon/include/SARibbon-2.0.1/SARibbonQuickAccessBar.h>
#include <Tools/Win64/SARibbon/include/SARibbon-2.0.1/SARibbonTabBar.h>

#include <QDebug>
#include <QGroupBox>
#include <QRadioButton>
#include <QSplitter>
#include <QTreeWidgetItem>
#include <QComboBox>
#include <QToolBar>

#include "GUIFrame/MainWindow.h"

#include "Tools/Win64/SARibbon/include/SARibbon-2.0.1/SARibbonBar.h"
#include "Tools/Win64/SARibbon/include/SARibbon-2.0.1/SARibbonMainWindow.h"
#include "Tools/Win64/SARibbon/include/SARibbon-2.0.1/SARibbonPannelItem.h"

#include "CFDPostUIComponents/ToolBarAnimation.h"
#include "CFDPostUIComponents/ToolBarColorMapper.h"
#include "CFDPostUIComponents/ToolBarEvent.h"
#include "CFDPostUIComponents/ToolBarFilter.h"
#include "CFDPostUIComponents/ToolBarVisualAngle.h"
#include "CFDPostUIComponents/ToolBarFileGeneral.h"

using namespace GUI;

namespace GUI {
    CFDPostMenu::CFDPostMenu(SARibbonCategory* category) : m_pSARCategory(category) {

    }

    ToolBarVisualAngle *CFDPostMenu::getToolBarVisualAngle() {
        return m_pVisualAngelToolBar;
    }

    ToolBarFileGeneral *CFDPostMenu::getToolBarFileGeneral() {
        return m_pFileGeneralToolBar;
    }

    ToolBarColorMapper *CFDPostMenu::getToolBarColorMapper() {
        return _colorMapToolBar;
    }

    ToolBarAnimation *CFDPostMenu::getToolBarAnimation() {
        return _animationToolBar;
    }

    ToolBarFilter *CFDPostMenu::getToolBarFilter() {
        return _filterBar;
    }

    ToolBarEvent *CFDPostMenu::getToolBarEvent() {
        return _filterEvent;
    }

    void CFDPostMenu::initAction(GUI::MainWindow* mainWindow) {
        if (mainWindow == nullptr) {
            return;
        }

        SARibbonPannel* pannel = m_pSARCategory->addPannel(tr("file general"));
        m_pFileGeneralToolBar = new GUI::ToolBarFileGeneral(pannel);

        pannel = m_pSARCategory->addPannel(tr("virsual tools"));
        m_pVisualAngelToolBar = new GUI::ToolBarVisualAngle(pannel);

        pannel = m_pSARCategory->addPannel(tr("animation tools"));
        _animationToolBar = new GUI::ToolBarAnimation(pannel);

        pannel = m_pSARCategory->addPannel(tr("colorMap tools"));
        _colorMapToolBar = new GUI::ToolBarColorMapper(pannel);

        pannel = m_pSARCategory->addPannel(tr("filter tools"));
        _filterBar = new GUI::ToolBarFilter(pannel);

        pannel = m_pSARCategory->addPannel(tr("data  anylasis"));
        _filterEvent = new GUI::ToolBarEvent(pannel);
    }
}
